From: Konrad Rzeszutek Wilk Date: Tue, 28 Jun 2011 17:15:44 +0000 (+0100) Subject: libxc: Squash xc_e820.h (and delete) into xenctrl.h X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10097 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/?a=commitdiff_plain;h=7e9ee87b3ec2158a9ac4e0dda838f177dcde92dd;p=xen.git libxc: Squash xc_e820.h (and delete) into xenctrl.h .. as there is no need to keep that internal header file anymore. We export two functions xc_domain_[set|get]_memory_map which depend on the 'struct e820entry' defined in 'xc_e820.h'. We move the contents of the 'xc_e820.h' to the 'xenctrl.h' fixing compiler errors when applications outside the Xen tree are trying to compile against the libraries. Tested-by: Daniel Castro Signed-off-by: Konrad Rzeszutek Wilk Committed-by: Ian Jackson --- diff --git a/tools/libxc/xc_core_x86.c b/tools/libxc/xc_core_x86.c index 3c5d430369..43bf17616c 100644 --- a/tools/libxc/xc_core_x86.c +++ b/tools/libxc/xc_core_x86.c @@ -20,7 +20,7 @@ #include "xg_private.h" #include "xc_core.h" -#include "xc_e820.h" +#include #define GET_FIELD(_p, _f) ((dinfo->guest_width==8) ? ((_p)->x64._f) : ((_p)->x32._f)) diff --git a/tools/libxc/xc_domain_save.c b/tools/libxc/xc_domain_save.c index 5bd2d5eb12..76a377acd4 100644 --- a/tools/libxc/xc_domain_save.c +++ b/tools/libxc/xc_domain_save.c @@ -33,7 +33,6 @@ #include "xg_save_restore.h" #include -#include "xc_e820.h" /* ** Default values for important tuning parameters. Can override by passing diff --git a/tools/libxc/xc_e820.h b/tools/libxc/xc_e820.h deleted file mode 100644 index fadfe73f2a..0000000000 --- a/tools/libxc/xc_e820.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __XC_E820_H__ -#define __XC_E820_H__ - -#include - -/* - * PC BIOS standard E820 types and structure. - */ -#define E820_RAM 1 -#define E820_RESERVED 2 -#define E820_ACPI 3 -#define E820_NVS 4 -#define E820_UNUSABLE 5 - -#define E820MAX (128) - -struct e820entry { - uint64_t addr; - uint64_t size; - uint32_t type; -} __attribute__((packed)); - -#endif /* __XC_E820_H__ */ diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h index 49447e63d9..5d12503aee 100644 --- a/tools/libxc/xenctrl.h +++ b/tools/libxc/xenctrl.h @@ -967,7 +967,22 @@ int xc_domain_set_memmap_limit(xc_interface *xch, unsigned long map_limitkb); #if defined(__i386__) || defined(__x86_64__) -#include "xc_e820.h" +/* + * PC BIOS standard E820 types and structure. + */ +#define E820_RAM 1 +#define E820_RESERVED 2 +#define E820_ACPI 3 +#define E820_NVS 4 +#define E820_UNUSABLE 5 + +#define E820MAX (128) + +struct e820entry { + uint64_t addr; + uint64_t size; + uint32_t type; +} __attribute__((packed)); int xc_domain_set_memory_map(xc_interface *xch, uint32_t domid, struct e820entry entries[],